<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="<?php echo $pageNum ?>" />
	<input type="hidden" name="numPerPage" value="<?php echo $limit ?>" />
	<input type="hidden" name="orderField" value="<?php echo $field ?>" />
	<input type="hidden" name="orderDirection" value="<?php echo $order_by ?>" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?php echo site_url('backend/warehouse/index'); ?>" method="post">
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label>输入地址：</label>
					<input name="address_districtName" type="text" size="30" readonly="readonly" value="<?php echo $this->input->post('address_districtName')?>"/>
					<input type="hidden" name="address_id" type="text" value="<?php echo $this->input->post('address_id')?>" readonly/>
					<a class="btnLook" href="<?php echo site_url('backend/warehouse/addAgent')?>" lookupGroup="address">网点</a>
				</li>
			</ul>
			<div class="subBar right">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?php echo site_url('backend/warehouse/add') ?>" target="navTab" rel="backend/warehouse/add"><span>新增小仓库</span></a></li>
			
			<li class="line">line</li>
			<li><a class="icon" href="javascript:;" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="112">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th>ID号</th>
				<th>商品图</th>
				<th>商品名称</th>
				<th>网点地址</th>
				<th>库存</th>
				<th>售出数</th>
				<th>更新日期</th>
			</tr>
		</thead>
		<tbody class="gridImg">
			<?php foreach ($data as $al): ?>
				   <tr target="sid_user" rel="<?php echo $al['id'] ?>">
					<td><input name="ids" value="<?php echo $al['id'] ?>" type="checkbox"></td>
					<td><?php echo $al['id'] ?></td>
					<td><a href="<?php echo base_url($al['img'])?>" data-target="fancybox" data-fancybox-group="gallery" title="<?php echo $al['name'] ?>"><img src="<?php echo base_url($al['img']) ?>" height="48"></a></td>
					<td><?php echo $al['name'] ?></td>
					<td><?php echo $al['description'],' ',$al['address'] ?></td>
					<td data-target="editable" data-params='{"html":"amount","db":"sm_warehouse_stock.stock","default":"<?php echo $al['stock']?>"}'></td>
					<td data-target="editable" data-params='{"html":"amount","db":"sm_warehouse_stock.sold_out","default":"<?php echo $al['sold_out']?>"}'></td>
					<td><?php echo date('Y-m-d H:i:s', $al['updated_at']) ?></td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage: this.value})">
				<?php foreach (array('20','50','100','200') as $v):?>
				<option value="<?php echo $v?>" <?php if($v==$limit):?>selected="selected"<?php endif;?>><?php echo $v?></option>
				<?php endforeach;?>
			</select>
			<span>条，共<?php echo $totalCount?>条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="<?php echo $totalCount?>" numPerPage="<?php echo $limit?>" pageNumShown="10" currentPage="<?php echo $pageNum?>"></div>

	</div>
</div>
